package com.px.lovepath.ui.home;

import java.util.Date;

import com.px.lovepath.domain.config.ConfigInfo;
import com.px.lovepath.ui.home.LoveMessage.Path;
import com.px.lovepath.utils.DateUtil;
import com.px.lovepath.utils.LLog;

import android.R.integer;
import android.util.Log;

public class SmsRecord extends LoveMessage {

	private final String mBody;
	
	public SmsRecord(Date date, String body, int type) {
		super(date, type == 1 ? Path.TOME : Path.TOIT);
		mBody = body;
		StringBuffer sb = new StringBuffer();
		sb.append(DateUtil.getDateString(mDate)).append(" ");
		if (getPath() == Path.TOIT) {
			sb.append(ConfigInfo.get().getUserName());
		} else {
			sb.append(ConfigInfo.get().getTaName());
		}
		sb.append("说: ");
		sb.append(body);
		mMessage = sb.toString();
		LLog.p("", mMessage);
	}
	public SmsRecord(Date date, Path type, String info) {
		super(date, type);
		mBody = "";
	}
	
	@Override
	public String getMessage() {
		return mMessage;
	}
	@Override
	public String getInfo() {
		// TODO Auto-generated method stub
		return null;
	}

}
